package com.huangliusong.demo1;

import com.imooc.ioc.demo1.UserService;
import com.imooc.ioc.demo4.User;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

public class SpringDemo1 {


    @Test
    public void test(){
        ApplicationContext applicationContext=new FileSystemXmlApplicationContext("C:\\Users\\kw-hls\\Desktop\\spring_ioc\\src\\main\\resources\\applicationContext");

        UserService userService=(UserService)applicationContext.getBean("userService");

        userService.sayHello();
    }
}
